
package ProOF.apl.problems.real.functions;

import ProOF.com.LinkerParameters;
import java.lang.Math;
/**
 *
 * @author Lucas
 */
public class RealFuncHSK extends aRealFunction{
	
	
	@Override
	public void parameters(LinkerParameters link) throws Exception {

	}
	
	@Override
	public int dimension() {
		return 2;
	}
	
	@Override
	public double min( int i ) {
		return 0;
	}
	
	@Override
	public double max( int i ) {
		if (i == 0) {
			return 5;
		}
		return 6;
	}

	@Override
	public double f(double[] x) throws Exception {
		check(x);
		
		return (1 - 8*x[0] + 7*Math.pow(x[0], 2) - (7.0/3)*Math.pow(x[0], 3) +
				(1.0/4)*Math.pow(x[0], 4))*x[1]*x[1]*Math.exp(-x[1]);
	}

	@Override
	public String name() {
		return "HSK";
	}

	@Override
	public String description() {
		return "Hosaki Problem";
	}	
}
